/*
 * @Author: your name
 * @Date: 2020-10-10 19:22:29
 * @LastEditTime: 2020-10-20 03:17:48
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \longh_admin\src\api\product.js
 */
import request from '@/utils/request'

//获取热点分类-树形getHotProductCategoryTree列表
export function GetProductCategoryTree(data) {
  return request({
    url: '/api/productCategory/getProductCategoryTree',
    method: 'POST',
    data
  })
}

//获取产品分类管理列表
export function GetProductCategoryList(data) {
  return request({
    url: '/api/productCategory/getPageList',
    method: 'POST',
    data
  })
}

//获取一级菜单
export function getProductOneCategory(params) {
  return request({
    url: '/api/productCategory/getByParent',
    method: 'GET',
    params
  })
}

//添加ProductCategory对象
export function AddProductCategory(params) {
  return request({
    url: '/api/productCategory/add',
    method: 'POST',
    data: params
  })
}

//删除ProductCategory对象
export function DeleteProductCategory(params) {
  return request({
    url: '/api/productCategory/delete',
    method: 'POST',
    data: params
  })
}

//获取ProductCategory对象详情
export function DetailProductCategory(params) {
  return request({
    url: '/api/productCategory/info',
    method: 'POST',
    data: params
  })
}

//修改ProductCategory对象
export function UpdateProductCategory(params) {
  return request({
    url: '/api/productCategory/update',
    method: 'POST',
    data: params
  })
}

//获取分页
export function GetSearchPageList(data) {
  return request({
    url: '/api/productInfo/getSearchPageList',
    method: 'POST',
    data
  })
}

//获取详情
export function GetproductInfo(data) {
  return request({
    url: '/api/productInfo/detail',
    method: 'POST',
    data
  })
}

//获取企业详情
export function GetentBaseInfo(data) {
  return request({
    url: '/api/entInfo/entBaseInfo',
    method: 'POST',
    data
  })
}

//产品审核
export function GetproductAudit(data) {
  return request({
    url: '/api/productInfo/audit',
    method: 'POST',
    data
  })
}

// 获取匹配企业推荐（产品需求）
export function getRecommEntInfo(data) {
  return request({
    url: '/api/productCategory/getEntInfoByProductCategory',
    method: 'POST',
    data
  })
}

// 匹配推荐（产品需求）
export function recommEntInfo(data) {
  return request({
    url: '/api/productCategory/productEntPush',
    method: 'POST',
    data
  })
}